

package com.kimo.shop.dao;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.kimo.shop.bean.dto.PageAnalysisDto;
import com.kimo.shop.bean.model.FlowPageAnalysis;
import com.kimo.shop.bean.param.FlowAnalysisParam;
import com.kimo.shop.bean.param.ProdAnalysisSurveyParam;
import com.kimo.shop.bean.param.ProdEffectRespParam;
import com.kimo.shop.bean.param.VisitorTopParam;
import com.kimo.shop.common.util.PageParam;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * 流量分析—页面数据统计表
 *
 * @author kimo-taozhouchuan
 * @date 2020-07-14 11:26:35
 */
public interface FlowPageAnalysisMapper extends BaseMapper<FlowPageAnalysis> {

    Integer countVisitProdInfoNum(@Param("param") ProdAnalysisSurveyParam param);

    Integer countProdExposeNum(@Param("param") ProdAnalysisSurveyParam param);

    Integer countVisitProdNum(@Param("param") ProdAnalysisSurveyParam param);

    Integer countProdVisitorNum(@Param("param") ProdAnalysisSurveyParam param);

    IPage<VisitorTopParam> getVisitorTop(@Param("pageVisitor") IPage<FlowPageAnalysis> pageVisitor, @Param("param") ProdAnalysisSurveyParam param, @Param("dbLang") Integer dbLang);

    Integer countProdExposeNumByParam(@Param("prodId") Long prodId, @Param("startTime") Date startTime, @Param("endTime") Date endTime);

    Integer countProdExposePersonNum(@Param("prodId") Long prodId, @Param("startTime") Date startTime, @Param("endTime") Date endTime);

    Integer countProdVisitorNumByProdId(@Param("prodId") Long prodId, @Param("startTime") Date startTime, @Param("endTime") Date endTime);

    PageParam<PageAnalysisDto> getPageOrProdAnalysis(PageParam<PageAnalysisDto> page, @Param("flowAnalysisParam") FlowAnalysisParam flowAnalysisParam);

    Integer countProdAddNum(@Param("prodId") Long prodId, @Param("startTime") Date startTime, @Param("endTime") Date endTime);

    Integer countprodAddPersonNum(@Param("prodId") Long prodId, @Param("startTime") Date startTime, @Param("endTime") Date endTime);

    Integer countAddCartProdNum(@Param("param") ProdAnalysisSurveyParam param);

    Integer countShareVisitNum(@Param("param") ProdAnalysisSurveyParam param);

    List<ProdEffectRespParam> getProdEffectByDateAndProdIds(@Param("prodIds") List<Long> prodIds, @Param("startTime") Date startTime, @Param("endTime") Date endTime);

    List<String> getProdIdsByTime(@Param("startTime") Date startTime, @Param("endTime") Date endTime);
}
